package com.fosun.spr.core.base.model;

import com.fosun.spr.core.constants.DataConstants;

 

/**
 * 
 * @author zhangcheng
 * @deprecated
 */
public abstract class CoBaseSpPageModel extends CoBaseSpModel {
	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	private Integer offset = DataConstants.NUM_0;
	private Integer size = DataConstants.NUM_10;
	private Integer cursor = DataConstants.NUM_0;

	
	public void modifyCursor(){
		if (offset - DataConstants.NUM_1 < DataConstants.NUM_0) {
			this.cursor = DataConstants.NUM_0;
		}else{
			this.cursor = (offset - DataConstants.NUM_1) * size;
		}
	}
	
	public Integer getCursor() {
		return cursor;
	}

	public void setCursor(Integer cursor) {
		this.cursor =cursor;
	}

	public Integer getOffset() {
		return offset;
	}

	public void setOffset(Integer offset) {
		this.offset = offset;
	}

	public Integer getSize() {
		return size;
	}

	public void setSize(Integer size) {
		this.size = size;
	}

}
